package com.mes.data.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.core.annotation.Excel;
import com.mes.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 数据采集配置对象 mes_data_collection
 * 
 * @author itflash
 * @date 2025-02-27
 */
public class DataCollection extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceCode;

    /** 传感器编号 */
    @Excel(name = "传感器编号")
    private String sensorCode;

    /** 数据类型（如温度、湿度、压力等） */
    @Excel(name = "数据类型", readConverterExp = "如=温度、湿度、压力等")
    private String dataType;

    /** 采集间隔（秒） */
    @Excel(name = "采集间隔", readConverterExp = "秒=")
    private Long collectInterval;

    /** 更新时间 */
    private Date updateDate;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDeviceCode(String deviceCode) 
    {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() 
    {
        return deviceCode;
    }
    public void setSensorCode(String sensorCode) 
    {
        this.sensorCode = sensorCode;
    }

    public String getSensorCode() 
    {
        return sensorCode;
    }
    public void setDataType(String dataType) 
    {
        this.dataType = dataType;
    }

    public String getDataType() 
    {
        return dataType;
    }
    public void setCollectInterval(Long collectInterval) 
    {
        this.collectInterval = collectInterval;
    }

    public Long getCollectInterval() 
    {
        return collectInterval;
    }
    public void setUpdateDate(Date updateDate) 
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate() 
    {
        return updateDate;
    }
    public void setCreateDate(Date createDate) 
    {
        this.createDate = createDate;
    }

    public Date getCreateDate() 
    {
        return createDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceCode", getDeviceCode())
            .append("sensorCode", getSensorCode())
            .append("dataType", getDataType())
            .append("collectInterval", getCollectInterval())
            .append("remark", getRemark())
            .append("updateDate", getUpdateDate())
            .append("createDate", getCreateDate())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
